
public class MainPlayerModel 
{
	public enum Profession {HOBO, MECHANIC, STOCKBROKER}
	private Profession pro;
	private MainPlayerView mv;
	private int currProfession;
	private double cash;
	private String name;
	private String[] partyMembers;
	private int numPartyMembers;
	private final int MAX_NUM_PARTY_MEMBERS = 4;
	
	public MainPlayerModel()
	{
		
		cash = 0.0;
		name = "";
		partyMembers = new String[MAX_NUM_PARTY_MEMBERS];
		numPartyMembers = 0;
		//currProfession = mv.getProfessionIndex();
		for(int i = 0; i < partyMembers.length; i++)
			partyMembers[i] = ""; 
	}
	
	public final int getMaxNumPartyMembers()
	{
		return MAX_NUM_PARTY_MEMBERS;
	}
	
	public int getNumPartyMembers()
	{
		return numPartyMembers;
	}
	
	public double calcInitialCash()
	{
		switch (currProfession%3)
		{
			case 0:
				cash = 100;
				//getTotalCash();
				break;
			case 1:
				cash = 500;
				//getTotalCash();
				break;
			case 2:
				cash = 600;
				//getTotalCash();
				break;
		}
		return cash;
		
	}
	
	public double getTotalCash(Profession pro)
	{
		this.pro = pro;
		switch(pro){
			case HOBO:
				cash = 1000;
				break;
			case MECHANIC:
				cash = 500;
				break;	
			case STOCKBROKER:
				cash = 600;
				break;
		}
		return cash;
	}
	
	public void setPartyMembers(String[] incomingMembers)
	{
		for(int i = 0; i < MAX_NUM_PARTY_MEMBERS; i++)
		{
			partyMembers[i] = incomingMembers[i];
			if(!partyMembers[i].equals(""))
				numPartyMembers++;
		}
	}
	
	public Profession getProfession()
	{
//		if(mv.getProfessionIndex() == 0){
//			currProfession = 0;
//		}
//		else if(mv.getProfessionIndex() == 1){
//			currProfession = 1;
//		}
//		else{
//			currProfession = 2;
//		}
		//currProfession = mv.getProfessionIndex();
		//return currProfession;
//		
	return pro;
	}
	
	public void setProfession(int currProfession)
	{
		this.currProfession = currProfession;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String getName()
	{
		return name;
	}
	
	public String[] getPartyMembers()
	{
		return partyMembers;
	}
	
	public void addToCash(double cash)
	{
		this.cash += cash;
	}
}
